package com.woniu.service.goldcommand;

import com.woniu.outlet.elasticSearch.po.Gold;
import com.woniu.util.ApplicationContextHolder;
import lombok.Data;

import java.util.List;

/**
 * @description:
 * @author: my
 * @time: 2021/5/7 16:54
 */
@Data
public class GetAllGoldCommand {
    private GetAllGoldCommandHandler handler;
    public GetAllGoldCommand(){
        this.handler =
                ApplicationContextHolder.getApplicationContext().getBean(GetAllGoldCommandHandler.class);
    }

    public List<Gold> execute(){
        return this.handler.action(this);
    }
}
